package com.zyh.flink.day04;

import java.util.Objects;

public class Coupon {
    private String category;
    private Double full;//达标消费金额
    private Double rebate;//优惠金额

    @Override
    public String toString() {
        return "Coupon{" +
                "category='" + category + '\'' +
                ", full=" + full +
                ", rebate=" + rebate +
                '}';
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Double getFull() {
        return full;
    }

    public void setFull(Double full) {
        this.full = full;
    }

    public Double getRebate() {
        return rebate;
    }

    public void setRebate(Double rebate) {
        this.rebate = rebate;
    }

    public Coupon() {
    }

    public Coupon(String category, Double full, Double rebate) {
        this.category = category;
        this.full = full;
        this.rebate = rebate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Coupon coupon = (Coupon) o;
        return category.equals(coupon.category) && full.equals(coupon.full) && rebate.equals(coupon.rebate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(category, full, rebate);
    }
}
